<?php
	function Conectar($query)
	{
		$conexion = mysql_connect("127.0.0.1", "root", "");
		mysql_select_db("compraenvios", $conexion);
		$resul = mysql_query($query, $conexion) or die(mysql_error());
		mysql_close($conexion);
		return $resul;
	}	
?>